#ifndef GAME_H_
#define GAME_H_

#include "irrlicht.h"

//#include "RTSCamera.h"

#include "Logger.h"

#include "EventCatcher.h"
#include "Handlers/KeyHandler.h"
#include "Handlers/ScreenshotHandler.h"

#include "GUI/TitleCompositeNode.h"

#include "GObj/Player.h"
#include "IrrNewt.hpp"




/**
 * @brief The actual application all resides within this class.
 */
class Game {
	private:
		// temp variables
		float distance;
		static const float SPEED;

		static irr::gui::IGUIFont* s_Font;		
		/// Quit the game?
		static bool m_quit;

	public:

		static irr::newton::IWorld* s_World;
		static irr::newton::ICameraBodyFPS* s_CameraBody;
		static IrrlichtDevice* s_Device;
		static scene::ICameraSceneNode* camera;
		static Facets::Player* s_Player;
		static double s_rot;
		
		static irr::gui::IGUIFont* getFont() {
			return s_Font;
		}
		
		/// Constructs the Game and sets default variables as needed.
		Game() {
			m_quit = false;
		}

		static scene::IAnimatedMeshSceneNode* CreateMeshNode(const core::stringc& filename);

		static scene::ITextSceneNode* CreateTextNode(const core::stringw& text, const core::vector3df& loc, bool scaling, scene::ISceneNode* par = 0, irr::core::dimension2df size = irr::core::dimension2df(0,0));
		
		static TitleCompositeNode* CreateTitleCompositeNode(irr::scene::ISceneNode* parent = 0, int id = -1);
		
		/// Quits the game at the end of the cycle.
		static void Quit() { m_quit = true; }

		/// Executes the game. Game's instructions are here.
		void Execute();

		/// Destruct the game
		virtual ~Game() { }
};

#endif /*GAME_H_*/
